/**
 * Created by firefoxmmx2 on 17-7-5.
 */
Ext.define('YBB.proxy.BaseProxy', {
    extend: 'Ext.data.RestProxy',
    alias: 'proxy.base',
    headers: {
        "authKey": function () {
            var loginDataStore = Ext.getStore("tokenStore");
            return loginDataStore.first().data.token;
        }()
    },
    reader: {
        type: 'json',
        rootProperty: 'data',
        successProperty: 'success',
        totalProperty: 'total'
    },
    writer: {
        type: 'json',
        // store同步时候的设置
        // writeAllFields: true,
        // allowSingle: false,
        expandData: true
        // writeRecordId:false
    }
});